package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.DstUserWeeklyDTO;
import com.financing.wap.dao.IDstUserWeeklyDao;
import com.financing.wap.common.SqlName;
/**
 * dst_user_weekly  
 * 用户访问周报 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstUserWeeklyDao")
public class DstUserWeeklyDaoImpl extends BaseDaoImpl<DstUserWeeklyDTO, java.lang.Integer> implements IDstUserWeeklyDao {


	@Override
	public int insert(DstUserWeeklyDTO dstUserWeekly) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstUserWeeklySql.insert, dstUserWeekly);
	}

	@Override
	public void update(DstUserWeeklyDTO dstUserWeekly) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserWeeklySql.update, dstUserWeekly);
	}

	@Override
	public void updateForce(DstUserWeeklyDTO dstUserWeekly) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserWeeklySql.updateForce, dstUserWeekly);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstUserWeeklySql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstUserWeeklyDTO> queryList(DstUserWeeklyDTO dstUserWeekly) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstUserWeeklySql.queryList, dstUserWeekly);
	}

	@Override
	public int queryListCount(DstUserWeeklyDTO dstUserWeekly) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstUserWeeklySql.queryListCount, dstUserWeekly);
	}

	@Override
	public DstUserWeeklyDTO loadById(Integer id) throws SQLException {
		return  (DstUserWeeklyDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstUserWeeklySql.loadById,id);
	}

	@Override
	public Class<DstUserWeeklyDTO> getEntityClass() {
		return DstUserWeeklyDTO.class;
	}
 	
}
